import moment from 'moment'

const timeSetting = {
  // 周日
  getSunDay: () => {
    const today = moment()
    const sunday = today.day(0) // 0 表示周日
    return sunday.format('MMM D, YYYY') // 格式化为 Apr 24, 2024
  },

  // 周一
  getMonDay: () => {
    const today = moment()
    const monday = today.day(1)
    return monday.format('MMM D, YYYY')
  },
  // 周二
  getTueDay: () => {
    const today = moment()
    const monday = today.day(2)
    return monday.format('MMM D, YYYY')
  },
  // 周三
  getWedDay: () => {
    const today = moment()
    const monday = today.day(3)
    return monday.format('MMM D, YYYY')
  },
  // 周四
  getThuDay: () => {
    const today = moment()
    const monday = today.day(4)
    return monday.format('MMM D, YYYY')
  },
  // 周五
  getFriDay: () => {
    const today = moment()
    const monday = today.day(5)
    return monday.format('MMM D, YYYY')
  },
  // 周六
  getSatDay: () => {
    const today = moment()
    const monday = today.day(6)
    return monday.format('MMM D, YYYY')
  },

  // 当前时间
  getCurrentTime: () => {
    return moment().format(' HH:mm:ss A MMM D,YYYY') // 当前时间格式
  },

  // 当前时间
  getHTime: () => {
    return moment().format(' HH:mm:ss ') // 当前时间格式
  },
}

export default timeSetting
